package com.matt.domain;

import com.matt.commons.model.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * *******************************
 * Created by Ron.
 * form com.matt
 * on 2017/8/1
 * *******************************
 */
@Data
@Entity
@Table(name = "teach_resource")
@EqualsAndHashCode(callSuper = true)
public class Resource extends Model {

    @Column
    private String resourceUrl;

    @Column
    private String resourceName;

    @Column
    private String comment;

    @Column
    private Boolean deleted = false;

    public static Resource of(String url, String name, String comment){
        Resource resource= new Resource();
        resource.setResourceUrl(url);
        resource.setResourceName(name);
        resource.setComment(comment);
        return resource;
    }


}
